import re

# dynasty = re.findall(r'\[\D]', "[唐]李白")
# print(dynasty)
#
# dynasty = re.finditer(r'\[\D]', "[唐]李白")
# print(next(dynasty).group())
#
# dynasty = re.search('\\[\\D]', "[唐]李白")
# print(dynasty.group())

# category_detail_url "/shicimark/tianyuanshi.html"
# category_detail_url = "/shicimark/tianyuanshi.html"
# result = re.findall(r'/shicimark/(.*).html', category_detail_url)
# print(result)

# dynasty = re.findall(r'\[\D](.*)', "[唐]李白")
# print(dynasty)

# s = "[唐]李白"
s = "[魏晋]曹操"
dynasty = re.findall(r'\[.*](.*)', s)
print(dynasty)
